The present invention relates to computer software analysis and testing.
Factory methods present a difficult challenge for static analysis techniques that model run-time objects based on their allocation sites. For a model built using static analysis techniques to be finite, run-time objects allocated during program execution must be represented by a finite set of abstract elements, which is typically based on object allocation sites, where all objects allocated at the same site are modeled as a single partition in the abstract program heap. Thus, where a factory method has multiple invocations, where each invocation represents a different control flow path that results in a different instance of the same class, the different instances would nevertheless be modeled as a single abstract object.